<extend name="Public/base" />

<block name="body">
<script type="text/javascript" src="__PUBLIC__/js/jquery-2.0.3.min.js"></script>
<script type="text/javascript" src="__JS__/jquery.mousewheel.js"></script>
<script src="__PUBLIC__/date/js/jquery.1.7.2.min.js"></script>
<script src="__PUBLIC__/date/js/mobiscroll_002.js" type="text/javascript"></script>
<script src="__PUBLIC__/date/js/mobiscroll_004.js" type="text/javascript"></script>
<link href="__PUBLIC__/date/css/mobiscroll_002.css" rel="stylesheet" type="text/css">
<link href="__PUBLIC__/date/css/mobiscroll.css" rel="stylesheet" type="text/css">
<script src="__PUBLIC__/date/js/mobiscroll.js" type="text/javascript"></script>
<script src="__PUBLIC__/date/js/mobiscroll_003.js" type="text/javascript"></script>
<script src="__PUBLIC__/date/js/mobiscroll_005.js" type="text/javascript"></script>
<link href="__PUBLIC__/date/css/mobiscroll_003.css" rel="stylesheet" type="text/css">
    <div class="main-title">
         <h2>{$meta_title}</h2>
    </div>
    <div class="tab-wrap with-padding">
       
        <div class="node-list">
            <div class="tab-pane in">
                <form action="__SELF__" method="POST" class="form-horizontal auth-form">
                 <input type="hidden" name="iid" value="{$data.id}" />
                 <input type="hidden" name="unit" value="{$unit.id}" />

                    <div class="form-item cf">
                        <label class="item-label">所属单位</label>

                        <div class="controls">
                            <span  class="text input-large form-control form-input-width"  placeholder="" >{$unit.title}</span>
                        </div><br/>
                    </div>
                    <div class="form-item cf">
                        <label class="item-label">上次缴费时间段(据此计算上次结余)</label>

                        <div class="controls">
                            <select name="old_start">
                                <option value="1">1月</option>
                                <option value="2">2月</option>
                                <option value="3">3月</option>
                                <option value="4">4月</option>
                                <option value="5">5月</option>
                                <option value="6">6月</option>
                                <option value="7">7月</option>
                                <option value="8">8月</option>
                                <option value="9">9月</option>
                                <option value="10">10月</option>
                                <option value="11">11月</option>
                                <option value="12">12月</option>
                            </select>&nbsp;&nbsp;至&nbsp;&nbsp;
                            <select name="old_end">
                                <option value="1">1月</option>
                                <option value="2">2月</option>
                                <option value="3">3月</option>
                                <option value="4">4月</option>
                                <option value="5">5月</option>
                                <option value="6">6月</option>
                                <option value="7">7月</option>
                                <option value="8">8月</option>
                                <option value="9">9月</option>
                                <option value="10">10月</option>
                                <option value="11">11月</option>
                                <option value="12">12月</option>
                            </select><br/><br/>
                        </div>
                    </div>

                   <div class="form-item cf">
                        <label class="item-label">缴费项名称</label>
                        <div class="controls">
                            <input type="text" class="text input-large form-control form-input-width" name="title" value="{$data.title}" placeholder="" >
                        </div>
                    </div>
                    <div class="form-item cf">
                        <label class="item-label">缴费项</label><br/>
                        <volist name="payList" id="vo">
                            <if condition="$vo.mark eq 'manage'">
                                <div class="controls">
                                <input type="checkbox" name="pay[]" value="{$vo.id},{$vo.amount},{$vo.mark}" <if condition="$vo.setstate eq 1 ">checked</if> />&nbsp;&nbsp;{$vo.title}<br/>
                                        <select name="ms">
                                            <option value="1">1月</option>
                                            <option value="2">2月</option>
                                            <option value="3">3月</option>
                                            <option value="4">4月</option>
                                            <option value="5">5月</option>
                                            <option value="6">6月</option>
                                            <option value="7">7月</option>
                                            <option value="8">8月</option>
                                            <option value="9">9月</option>
                                            <option value="10">10月</option>
                                            <option value="11">11月</option>
                                            <option value="12">12月</option>
                                        </select>&nbsp;&nbsp;至&nbsp;&nbsp;
                                        <select name="me">
                                            <option value="1">1月</option>
                                            <option value="2">2月</option>
                                            <option value="3">3月</option>
                                            <option value="4">4月</option>
                                            <option value="5">5月</option>
                                            <option value="6">6月</option>
                                            <option value="7">7月</option>
                                            <option value="8">8月</option>
                                            <option value="9">9月</option>
                                            <option value="10">10月</option>
                                            <option value="11">11月</option>
                                            <option value="12">12月</option>
                                        </select><br/><br/>
                                </div>
                                <elseif condition="$vo.mark eq 'food'"/>
                                <div class="controls">
                                <input type="checkbox" name="pay[]" value="{$vo.id},{$vo.amount},{$vo.mark}" <if condition="$vo.setstate eq 1 ">checked</if> />&nbsp;&nbsp;{$vo.title}<br/>
                                        <select name="fs">
                                            <option value="1">1月</option>
                                            <option value="2">2月</option>
                                            <option value="3">3月</option>
                                            <option value="4">4月</option>
                                            <option value="5">5月</option>
                                            <option value="6">6月</option>
                                            <option value="7">7月</option>
                                            <option value="8">8月</option>
                                            <option value="9">9月</option>
                                            <option value="10">10月</option>
                                            <option value="11">11月</option>
                                            <option value="12">12月</option>
                                        </select>&nbsp;&nbsp;至&nbsp;&nbsp;
                                        <select name="fe">
                                            <option value="1">1月</option>
                                            <option value="2">2月</option>
                                            <option value="3">3月</option>
                                            <option value="4">4月</option>
                                            <option value="5">5月</option>
                                            <option value="6">6月</option>
                                            <option value="7">7月</option>
                                            <option value="8">8月</option>
                                            <option value="9">9月</option>
                                            <option value="10">10月</option>
                                            <option value="11">11月</option>
                                            <option value="12">12月</option>
                                        </select><br/><br/>
                                </div>
                                <else/>
                                <input type="checkbox" name="pay[]" value="{$vo.id},{$vo.amount},{$vo.mark}" <if condition="$vo.setstate eq 1 ">checked</if> />&nbsp;&nbsp;{$vo.title}<br/>
                            </if>
                        </volist>
                    </div>
<br/>
                    <div class="form-item cf">
                        <label class="item-label">备注信息</label>
                        <div class="controls">
                            <input type="text" class="text input-large form-control form-input-width" name="remark" value="{$data.remark}" placeholder="" >
                        </div>
                    </div>

                    <label class="item-label">开始缴费</label>
                    <input value="{$data['start_date']}" class="text input-large form-control form-input-width" readonly="readonly" name="start_date" id="start_date" type="text" >
                    <label class="item-label">关闭缴费</label>
                    <input value="{$data['end_date']}" class="text input-large form-control form-input-width" readonly="readonly" name="end_date" id="end_date" type="text">
                   
                        <script type="text/javascript">
                            $(function () {
                                var currYear = (new Date()).getFullYear();  
                                var opt={};
                                opt.date = {preset : 'date'};
                                opt.datetime = {preset : 'datetime'};
                                opt.time = {preset : 'time'};
                                opt.default = {
                                    theme: 'android-ics light', //皮肤样式
                                    display: 'modal', //显示方式 
                                    mode: 'scroller', //日期选择模式
                                    dateFormat: 'yyyy-mm-dd',
                                    lang: 'zh',
                                    showNow: true,
                                    nowText: "今天",
                                    startYear: currYear - 10, //开始年份
                                    endYear: currYear + 10 //结束年份
                                };

                                $("#start_date").mobiscroll($.extend(opt['date'], opt['default']));
                                var optDateTime = $.extend(opt['datetime'], opt['default']);
                                var optTime = $.extend(opt['time'], opt['default']);
                                $("#start_date").mobiscroll(optDateTime).datetime(optDateTime);
                                $("#appTime").mobiscroll(optTime).time(optTime);

                                $("#end_date").mobiscroll($.extend(opt['date'], opt['default']));
                                var optDateTime = $.extend(opt['datetime'], opt['default']);
                                var optTime = $.extend(opt['time'], opt['default']);
                                $("#end_date").mobiscroll(optDateTime).datetime(optDateTime);
                                $("#appTime").mobiscroll(optTime).time(optTime);
                                // //管理费
                                // $("#mstart_date").mobiscroll($.extend(opt['date'], opt['default']));
                                // $("#mend_date").mobiscroll($.extend(opt['date'], opt['default']));
                                // //餐费
                                // $("#fstart_date").mobiscroll($.extend(opt['date'], opt['default']));
                                // $("#fend_date").mobiscroll($.extend(opt['date'], opt['default']));
                            });
                        </script> 
                    <input type="hidden" name="a_type" value="{$a_type}" />
                    <div style="margin-top: 20px;"></div>
                    <button type="submit" class="btn submit-btn " target-form="auth-form">{:L("_SURE_WITH_SPACE_")}</button>
                    <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">{:L("_RETURN_WITH_SPACE_")}</button>
                    <!-- <input type="submit" name=""/> -->
                </form>
            </div>
        </div>
    </div>

</block>
<block name="script">
    <script type="text/javascript" src="__STATIC__/qtip/jquery.qtip.min.js"></script>
    <link rel="stylesheet" type="text/css" href="__STATIC__/qtip/jquery.qtip.min.css" media="all">
    <script type="text/javascript" charset="utf-8">
        // $('#mtitle').click(function(){
        //     alert('asd');
        // })
        //导航高亮
        highlight_subnav('{:U('Pay/bill')}');
    </script>
</block>
